package com.nononsenseapps.feeder.model

import com.nononsenseapps.feeder.db.room.ID_UNSET


/**
 * Should only be created with the activity as its lifecycle
 */
object ListEphemeralState {

    var lastOpenFeedId: Long = ID_UNSET

    var lastOpenFeedTag: String = ""

   // var firstVisibleListItem: Int? = null

    override fun toString():String="lastOpenFeedId:$lastOpenFeedId\tlastOpenFeedTag:$lastOpenFeedTag"
}

object ReadEphemeralState{
    var lastOpenFeedItemId: Long = ID_UNSET
        set(value) {
            if (value != lastOpenFeedItemId) {
                lastReadPostion =null
            }
            field = value
        }

    var lastReadPostion: Int? = null

    override fun toString():String="lastOpenFeedItemId:$lastOpenFeedItemId\tlastReadPostion:$lastReadPostion"
}